package com.emmy.walnut.custom;

import com.emmy.walnut.constant.AppConstant;
import com.emmy.walnut.util.TimeStampUtil;
import com.github.mikephil.charting.charts.BarLineChartBase;
import com.github.mikephil.charting.formatter.ValueFormatter;

import java.text.SimpleDateFormat;

/**
 * @ClassName weekValueFormatter
 * @Description TODO
 * @Author zhouxuan
 * @Date 2020/02/07 11:38
 * @Version 1.0
 */
public class WeekValueFormatter extends ValueFormatter {

    private final BarLineChartBase<?> chart;

    public WeekValueFormatter(BarLineChartBase<?> chart) {
        this.chart = chart;
    }

    @Override
    public String getFormattedValue(float value) {

        int index = (int) value;
        if (index>7){
            return "";
        }
        return AppConstant.week[index];

    }
}
